package com.example.house.api

import com.example.common.view.api.BaseApiService
import com.example.house.entity.HouseAddBody
import com.example.house.entity.HouseAddEntity
import com.example.house.entity.HouseEntityItem
import com.example.house.model.HouseResultData
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

interface HouseApiService :BaseApiService{
    @GET("/api/properties/region/{regionId}")
    suspend fun getHouse(@Path("regionId")regionId:Int):HouseResultData<List<HouseEntityItem>>
    @GET("/api/properties")
    suspend fun getHouseAll():HouseResultData<List<HouseEntityItem>>
    @POST("/api/merchant-applications")
    suspend fun postHouseAdd(@Body body: HouseAddBody):HouseResultData<HouseAddEntity>
    @GET("/api/merchant-applications")
    suspend fun getHouseApply():HouseResultData<List<HouseAddEntity>>
}